home *** CD-ROM | disk | FTP | other *** search
- NB. file input output utility
- NB. drag to a J window to load
- NB. needs !Scrap and RAM disk
-
- fileout=: '<Wimp$ScrapDir>.Jout'
- filein=: '<Wimp$ScrapDir>.Jin'
- fread =. 1!:1
- fwrite=. 1!:2
- sys =. 0!:0
- xsys =. 0!:1
-
- NB. a is numeric matrix
- NB. a=.i. 5 7
-
- NB. syntax: fileout out a
-
- out=:'' : ('b=. ,(":,.y.),.10{a.';'b=. ''-''((b=''_'')#i.#b)}b'; 'b fwrite <x.')
-
- NB. syntax: e=. in filein
- NB. reads file into J from scrap
- in=: ( 'c=. fread <y.';'c=. ''_''((c=''-'')#i.#c)}c' ; 'd=. c=10{a.' ; 'e=. d<;._2 c' ;'e=. ".>e') : ''
-
- NB. useful syntax: fileout out function in filein
-